package com.nbsaas.boot.ai.rest.convert;

import com.nbsaas.boot.ai.data.entity.AiSession;
import com.nbsaas.boot.ai.api.domain.simple.AiSessionSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
 * AI对话会话-列表对象转换器
 */

public class AiSessionSimpleConvert implements Converter<AiSessionSimple, AiSession> {


    @Override
    public AiSessionSimple convert(AiSession source) {
        AiSessionSimple result = new AiSessionSimple();

        result.setSummary(source.getSummary());
        result.setNote(source.getNote());
        result.setMessageCount(source.getMessageCount());
        result.setSessionKey(source.getSessionKey());
        result.setLastInteractTime(source.getLastInteractTime());
        result.setLastMessage(source.getLastMessage());
        result.setSort(source.getSortNum());
        result.setTitle(source.getTitle());
        result.setUserId(source.getUserId());
        result.setAddDate(source.getAddDate());
        result.setArchived(source.getArchived());
        result.setAppId(source.getAppId());
        result.setId(source.getId());
        result.setLastDate(source.getLastDate());


        return result;
    }

}